package com.edu.buservice.biz.enums;

import lombok.Getter;

/**
 * @program: KQAIA
 * @description: 登录类型Handler的枚举类
 * @author: 无恙
 * @create: 2025-03-07 22:02
 **/

@Getter
public enum LoginTypeEnum {

	/**
	 * 账号密码登录
	 */
	PASSWORD("normalLogin","normalLogin", "账号密码登录");

	private final String code;

	private final String handler;

	private final String desc;

	LoginTypeEnum(String code, String handler,String desc) {
		this.code = code;
		this.handler = handler;
		this.desc = desc;
	}

	public static LoginTypeEnum getByCode(String code) {
		for (LoginTypeEnum loginTypeEnum : values()) {
			if (loginTypeEnum.getCode().equals(code)) {
				return loginTypeEnum;
			}
		}
		return null;
	}

}
